// Macros.error( view, "Classname is " + classname );
}
}
}
}
// Macros.error( view, "Parsing complete" );
if( javaDependency==null )
{
Macros.error( view, "You must supply a JDK dependency. Please add it and rerun the macro." );
return;
}
if( jEditDependency==null )
{
Macros.error( view, "You must supply a jEdit dependency. Please add it and rerun the macro." );
return;
}
if( shortDescription==null )
{
Macros.error( view, "You must supply a short description in the plugin." + classname + ".description property. Please add it and rerun the macro." );
return;
}
if( longDescriptionFileName==null )
{
longDescriptionFileName = "description.html";
// Macros.error(view, "setting default long description file");
}
//load the long description
File descriptionFile = new File( new File(buffer.getPath()).getParent(), longDescriptionFileName );
if(!descriptionFile.exists())
{
Macros.error( view, "You must supply a long description in a file located at " + descriptionFile.getPath() + ". Please create it and rerun the macro." );
return;
}
BufferedReader reader = new BufferedReader( new FileReader( descriptionFile ) );
try
{
String line;
while( (line = reader.readLine())!=null )
{
longDescription = longDescription + line + "\n";
}
}
finally
{
reader.close();
}
// create dialog object and set its features
title = "Create Plugin Announcement";
dialog = new JDialog( view, title, false );
content = new JPanel( new BorderLayout() );
content.setBorder( new EmptyBorder( 12, 12, 12, 12 ) );
dialog.setContentPane( content );
// add to the dialog a panel containing the text fields for
// entry of the prefix and suffix text
propsPanel = new JPanel( new GridLayout( 5 + pluginDependencies.size() + optionalPluginDependencies.size() , 2, 2, 6 ) );
propsPanel.add( new JLabel( "Plugin name" ) );
propsPanel.add( new JLabel( pluginName ) );
propsPanel.add( new JLabel( "Plugin version" ) );
propsPanel.add( new JLabel( version ) );
propsPanel.add( new JLabel( "Activates" ) );
propsPanel.add( new JLabel( activate ) );
propsPanel.add( new JLabel( "jEdit Dependency" ) );
propsPanel.add( new JLabel( jEditDependency ) );
propsPanel.add( new JLabel( "JDK Dependency" ) );
propsPanel.add( new JLabel( javaDependency ) );
PluginDependencyNameComparator comparator = new PluginDependencyNameComparator();